package listTest;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86136
 * Date: 2024-07-16
 * Time: 14:20
 */
public class Test {
    public static void main(String[] args) {
        ArrayList<Integer> arrayList = new ArrayList<>();

        ArrayList<Integer> arrayList1 = new ArrayList<>(10);
        arrayList1.add(1);
        arrayList1.add(2);
        System.out.println(arrayList1);
        ArrayList<Integer> arrayList2 = new ArrayList<>(arrayList1);
        System.out.println(arrayList2);

    }
    public static void main1(String[] args) {
        MyArray myArray = new MyArray();
        //myArray.get(0);
        //myArray.set(0,1);
        //myArray.add(-1,2);
        myArray.add(1);
        //myArray.set(-1,1);
        myArray.add(2);
        myArray.add(1,99);
        myArray.display();
        System.out.println();
        System.out.println(myArray.contains(2));
        System.out.println(myArray.indexOf(1));
        //myArray.get(-1);
        myArray.remove(1);
        myArray.display();

    }
}
